#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int convertInteger(int A, int B)
{
	int k = 0;
	k = A ^ B;
	int count = 0;
	while (k)
	{
		k = k & (k - 1);
		count++;
	}
	return count;
}

int main()
{
	int a = 0;
	int b = 0;
	scanf("%d %d", &a, &b);

	int ret = convertInteger(a, b);
	printf("%d\n", ret);
	return 0;
}